﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<brjostagjof.Models.Article>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Faldar greinar
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Faldar greinar:</h2>

    <% foreach (var item in Model)
       { %>
    <h2 class="title"><%: item.ArticleBase.InformationBase.headline%></h2>
    <p class="meta">Höfundur: <a href="#"><%: item.ArticleBase.User.name%></a>, <%: item.ArticleBase.InformationBase.date%>
	    &nbsp;&bull;&nbsp;
        <a href="/Home/GetArticleByCategoryID/<%: item.ArticleBase.ArticleCategory.ID %>" class="permalink"> <%: item.ArticleBase.ArticleCategory.name%></a></p>
    <div class="entry">
    <div class="entry-bgtop">
    <div class="entry-bgbtm">
        <p><%= item.ArticleBase.InformationBase.context%></p>
    </div>
    </div>
    </div>
    <% if (Page.User.IsInRole("Administrators"))
       { %>
    <p><a href="/Home/EditArticle/<%: item.articleBaseID %>">Breyta grein</a></p>
    <% }
       }%>

</asp:Content>
